package org.wu.framework.lazy.orm.database.jpa.repository.annotation;

import org.wu.framework.core.annotation.AliasFor;
import org.wu.framework.lazy.orm.database.jpa.repository.enums.QueryType;

import java.lang.annotation.*;

@Documented
@Inherited
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD})
@LazyQuery(queryType = QueryType.SELECT)
public @interface LazySelect {

    /**
     * 需要执行的sql
     * <pre>
     *     如：
     *     <code>
     *         select * from sys_user where id={id}
     *     </code>
     * </pre>
     */
    @AliasFor(attribute = "value", annotation = LazyQuery.class)
    String value();
}
